package com.wcy.app.lib.web.utils;

import android.app.Activity;

import com.alibaba.android.arouter.launcher.ARouter;
import com.wcy.app.lib.web.interfaces.AttributeWebView;

/**
 * WebViewLoad
 *
 * @version 4.0.0
 * @auth wangchaoyong
 * @time 2019/11/16
 * @description applibrary
 */
public class WebViewLoad {
    public final String URL = "url";

    public static void load(String url) {
        load(url, "");
    }

    public static void load(String url, String watermark) {
        ARouter.getInstance().build("/webview/web_activity").withString(AttributeWebView.URL, url).withString(AttributeWebView.watermark, watermark).navigation();
    }

    public static void load(Activity activity, String url, int requestCode) {
        load(activity, url, "", requestCode);
    }

    public static void load(Activity activity, String url, String watermark, int requestCode) {
        ARouter.getInstance().build("/webview/web_activity").withString(AttributeWebView.URL, url).withString(AttributeWebView.watermark, watermark).navigation(activity, requestCode);
    }
}
